gulp         = require 'gulp'
paths        = require('../config.coffee').paths
rename       = require('gulp-rename')
revCollector = require 'gulp-rev-collector'

gulp.task 'index', ->
    gulp.src(paths.index)
        .pipe(gulp.dest(paths.dest))
gulp.task 'index_modal', ->
    gulp.src(paths.index_modal)
    .pipe rename('index.html')
    .pipe(gulp.dest(paths.dest))
gulp.task 'mockIndex', ->
    gulp.src(paths.mockIndex)
        .pipe(gulp.dest(paths.dest))
gulp.task 'distIndex', ->
    gulp.src(paths.distIndex)
        .pipe rename('index.html')
        .pipe(gulp.dest(paths.dest))

gulp.task 'rev', ->
    gulp.src(['rev/**/*.json', 'www/index.html'])
        .pipe revCollector {
            replaceReved: true
        }
        .pipe(gulp.dest(paths.dest))
